function [  ] = lgp_demo1( )
%UNTITLED Summary of this function goes here
%   Detailed explanation goes here

initLGPMetaData;

inputDataSetA = @()(rand(1000,1));
realLog = @(x)( real(log(x)));
sizeDim1 = @(x)(size(x,1));
linearSize = @(x)( max(size(x,1),1) .*  min(size(x,2),1));
%example getArrayIndex usage
%x = rand(10,5);
%subX = getArrayIndex(x,1,11);

metadata = addLGPFunction(metadata,'size',[metadata.TYPE_NUMERIC metadata.TYPE_NUMERIC],[metadata.TYPE_NUMERIC]);
metadata = addLGPFunction(metadata,'sizeDim1',[metadata.TYPE_NUMERIC],[metadata.TYPE_NUMERIC]);
metadata = addLGPFunction(metadata,'plus',[metadata.TYPE_NUMERIC],[metadata.TYPE_NUMERIC metadata.TYPE_NUMERIC]);
metadata = addLGPFunction(metadata,'times',[metadata.TYPE_NUMERIC],[metadata.TYPE_NUMERIC metadata.TYPE_NUMERIC]);
metadata = addLGPFunction(metadata,'realLog',[metadata.TYPE_NUMERIC],[metadata.TYPE_NUMERIC]);
metadata = addLGPFunction(metadata,'inputDataSetA',[metadata.TYPE_NUMERIC],[]);
metadata = addLGPFunction(metadata,'exp',[metadata.TYPE_NUMERIC],[metadata.TYPE_NUMERIC]);
metadata = addLGPFunction(metadata,'linearSize',[2],[2]);
metadata = addLGPFunction(metadata,'getArrayIndexLinear',[2],[2,2,2]);

%create initial population
initialPopulationSize = 100;
population = createLGPPopulation(metadata,initialPopulationSize,100);

numberOfOutputs = 10;
numberOfLines = 100;

emptyInd = createLGPIndividual(numberOfLines,metadata.maxFunctionArity);

%set which lines of code are used as outputs randomly
emptyInd.outputs =  randsample(1:numberOfLines,numberOfOutputs);
%but for MEP, every line of code (except for terminals?) should be an
%output
emptyInd.outputs =  length(emptyInd.inputLines)+1:size(emptyInd.expressionList,1);

end

